package com.per.mybootall.test.testNewBean;

import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 *
 * @author: yyy
 * Date: 2022/6/27
 * Time: 9:12
 * Description:需要多例bean的bean
 */
@Component
public class testBean {
    public int age;
    public String name;
    public int sex;


    public int getAge() {
        return age;
    }

    public testBean builderAge(int age) {
        this.age = age;
        return this;
    }

    public String getName() {
        return name;
    }

    public testBean builderName(String name) {
        this.name = name;
        return this;
    }

    public int getSex() {
        return sex;
    }

    public testBean builderSex(int sex) {
        this.sex = sex;
        return this;
    }

    public testBean() {
        this.age = 0;
        this.name = null;
        this.sex = 0;
    }

    public testBean(int age) {
        this.age = age;
        this.name = null;
        this.sex = 0;
    }

    public testBean builderBean(){
        return new testBean();
    }

    @Override
    public String toString() {
        return "testBean{" +
                "age=" + age +
                ", name='" + name + '\'' +
                ", sex=" + sex +
                '}';
    }
}
